-- GENERATED SPELL FOR [Gray Bear] --


function spell0_2351(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(61685,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2351', 4000, 1)
end

function spell1_2351(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2351', 573, 1)
end

function spell2_2351(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1753,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2351', 0, 1)
end

function spell3_2351(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14917,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2351', 0, 1)
end

function spell4_2351(pUnit, Event) --@Swipe,n/a--
pUnit:FullCastSpellOnTarget(53526,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2351', 0, 1)
end

function Sorts_2351(pUnit, Event)
local choix_sorts_2351 = math.random(0, 4)
if choix_sorts_2351 == 0 then
pUnit:RegisterEvent('spell0_2351', 1, 1)
end
if choix_sorts_2351 == 1 then
pUnit:RegisterEvent('spell1_2351', 1, 1)
end
if choix_sorts_2351 == 2 then
pUnit:RegisterEvent('spell2_2351', 1, 1)
end
if choix_sorts_2351 == 3 then
pUnit:RegisterEvent('spell3_2351', 1, 1)
end
if choix_sorts_2351 == 4 then
pUnit:RegisterEvent('spell4_2351', 1, 1)
end
end

function mob2351_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2351', math.random(1500, 3000), 1)
end

function mob2351_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2351_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2351_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2351, 1, 'mob2351_Action')
RegisterUnitEvent(2351, 2, 'mob2351_Leave')
RegisterUnitEvent(2351, 3, 'mob2351_Kill')
RegisterUnitEvent(2351, 4, 'mob2351_Die')
